class Solution(object):
    def canThreePartsEqualSum(self, arr):
        """
        :type arr: List[int]
        :rtype: bool
        """
        t = sum(arr)
        if t % 3 != 0:
            return False
        target = t // 3
        c = 0
        s = 0
        for num in arr:
            s += num
            if s == target:
                c += 1
                s = 0
        return c >= 3
